<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<%@ page import="jp.co.cos.ittrick.channel.model.ChannelModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.CategoryModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ChapterModel" %>
<%@ page import="java.util.List" %>
<html lang="ja">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>${channelModel.name }：IT TRICK</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum=1">
	<meta name="description" content="${channelModel.description }" />
	<meta name="keywords" content="${channelModel.keyWordListString}" />
	<link rel="icon" type="image/gif" href="/favicon.png" >
	<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss">
	<link href="/css/reset.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="/css/sp/common.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="/css/sp/channel.css" rel="stylesheet" type="text/css" media="screen" />
	<script src="/js/modernizr-1.1.min.js"></script>
	<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</head>
<body>
<!--header-->
	<jsp:include page="/common/sp/header.jsp" />
<!--/header-->


	<!-- mainContent -->
		<div id="mainContent">
			<article>

			<!-- mainTopContent -->
				<section id="mainTopContent">
					<h1>${channelModel.name }</h1>
					${channelModel.contentString }
				</section>
			<!-- /mainTopContent -->

			<!-- AdSense -->
			<jsp:include page="/common/adSense/sp/text_image_320_50.jsp" />
			<!-- /AdSense -->

			<!-- mainNav -->
				<div id="mainNav">
					<%
					ChannelModel channelModel = (ChannelModel)request.getAttribute("channelModel");
					List<CategoryModel> categoryList = channelModel.getCategoryModelListRef().getModelList();
					for(CategoryModel categoryModel: categoryList) {
					%>
					<nav class="articleMenu">
						<h2><%=categoryModel.getName() %></h2>
						<ul class="chapterlist">
							<%
							List<ChapterModel> chapterList = categoryModel.getChapterModelListRef().getModelList();
							for(ChapterModel chapterModel: chapterList) {
							%>
							<li class="navi">
								<%if(chapterModel.getPublicFlg()) { %>
									<a href="/<%=channelModel.getKeyString() %>/c<%=chapterModel.getKeyString() %>.html"><%=chapterModel.getName() %></a>
								<%}else { %>
									<span><%=chapterModel.getName() %></span>
								<%} %>
							</li>
							<%} %>
						</ul>
					</nav>
					<%} %>
				</div>
			<!-- /mainNav -->

			<!-- AdSense -->
			<jsp:include page="/common/adSense/sp/text_image_300_250.jsp" />
			<!-- /AdSense -->


			</article>
		</div>
	<!-- /mainContent -->

	<!--footer-->
	<jsp:include page="/common/sp/footer.jsp" />
	<!-- /footer-->

</body>
</html>
